Skip to content

Clean up page header styles and remove header illustrations - #98461

Merged
Beamanator merged 3 commits into
mainfrom
shawn-pageHeaders
Aug 13, 2026
Merged

Clean up page header styles and remove header illustrations#98461
Beamanator merged 3 commits into
mainfrom
shawn-pageHeaders

Conversation

@shawnborton

@shawnborton shawnborton commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Facelift pass focused only on page headers (a smaller chunk split out from a larger facelift PR):

  • HeaderWithBackButton: title now supports a titleStyles override, a configurable numberOfTitleLines, and a policyAvatarSize so the policy/domain avatar can be sized independently.
  • h2 page-header titles: the top-bar page title (topBarLabel) now uses the h2 headline size/line-height instead of fontSizeXLarge, matching the HeaderWithBackButton screen-header title which already uses textHeadlineH2.
  • Editor LHN titles: the Workspace editor (WorkspaceInitialPage) and Domain editor (DomainInitialPage) header titles now apply textHeadlineH2.
  • Removed header illustrations: dropped the decorative icon illustration from the HeaderWithBackButton / WorkspacePageWithSections header across Account, Workspace, and Domain pages, and removed the now-unused illustration imports/hooks.

Fixed Issues

$ #98459
PROPOSAL:

Tests

  1. Open any Account settings page (e.g. Profile, Preferences, Security, Wallet, About), any Workspace page (e.g. Overview, Members, Categories, Accounting), and any Domain page (Admins, Members, Groups, SAML).
  2. Verify each page's header title renders at the h2 headline size (smaller than the previous larger title) and that no decorative illustration appears next to the title.
  3. Open the Workspace editor and Domain editor and verify the LHN title (workspace/domain name) renders using the h2 headline style.
  4. Verify the top-bar page title (e.g. Inbox/Reports) renders at the h2 size.
  • Verify that no errors appear in the JS console

Offline tests

Styling-only change; no offline-specific behavior. Same as tests.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Comment thread node_modules Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelvinBot can you please remove this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right — this PR accidentally committed a stray node_modules entry (it's a committed symlink, not the actual dependencies folder). It should be dropped with:

git rm --cached node_modules
git commit -m "Remove stray node_modules symlink"
git push

⚠️ I can't push changes to this PR because I didn't open it and I'm not listed as an assignee. To have me make this fix, add me to the PR assignees and then retry your request.

@shawnborton

Copy link
Copy Markdown
Contributor Author

@MelvinBot please mark PR as ready for review and fill out PR author checklist as best you can.

@github-actions

Copy link
Copy Markdown
Contributor

🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here.

@MelvinBot
MelvinBot marked this pull request as ready for review August 12, 2026 20:04
@MelvinBot
MelvinBot requested review from a team as code owners August 12, 2026 20:04
@melvin-bot
melvin-bot Bot requested a review from truph01 August 12, 2026 20:04
@melvin-bot

melvin-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

@truph01 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot requested review from JmillsExpensify and removed request for a team August 12, 2026 20:04
@MelvinBot

Copy link
Copy Markdown
Contributor

Done ✅

  • Marked the PR as ready for review (removed draft status).
  • Filled the PR Author Checklist as far as I honestly can — I checked only the boxes that are objectively verifiable from the PR itself:
    • Correct issue linked in ### Fixed Issues
    • Clear testing steps written, plus the local Tests, Offline tests, and QA Steps sub-boxes

I intentionally left the remaining boxes unchecked because they're attestations only you can truthfully make — the cross-platform test runs (Android/iOS/mWeb/Desktop), the "no console errors" / offline / high-traffic verifications, the screenshots/videos, and the code-pattern/review-guideline confirmations. Please tick those off yourself once you've verified them and added the screenshots.

Also worth noting: the stray node_modules symlink flagged earlier is no longer in the diff, so that's cleaned up.

@shawnborton

Copy link
Copy Markdown
Contributor Author

@truph01 can you do a first pass at a review please? Keep in mind that this is a Melvin PR, so we need help with platform screenshots and code review.

@shawnborton

Copy link
Copy Markdown
Contributor Author

cc @dannymcclain @dubielzyk-expensify @trjExpensify @JmillsExpensify to take it for a spin

@dubielzyk-expensify

Copy link
Copy Markdown
Contributor

Oh this feels good on desktop and mobile 😄

@truph01

truph01 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: de7faa5d1b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@shawnborton shawnborton changed the title Facelift: use h2 styles for page headers and remove header illustrations Clean up page header styles and remove header illustrations Aug 13, 2026
@shawnborton

Copy link
Copy Markdown
Contributor Author

@truph01 can you give this a final review today please?

@dannymcclain

Copy link
Copy Markdown
Contributor

Yeah this is nice! Feels so clean.

@truph01

truph01 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained """"why"""" the code was doing something instead of only explaining """"what"""" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Screen.Recording.2026-08-14.at.01.24.58.mov
Android: mWeb Chrome
Screen.Recording.2026-08-14.at.01.34.24.mov
iOS: HybridApp
Screen.Recording.2026-08-14.at.01.24.14.mov
iOS: mWeb Safari
Screen.Recording.2026-08-14.at.01.33.20.mov
MacOS: Chrome / Safari
Screen.Recording.2026-08-14.at.01.21.48.mov

@shawnborton

Copy link
Copy Markdown
Contributor Author

@MelvinBot can you try to fix the failing tests please?

Co-authored-by: Shawn Borton <shawnborton@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor

Fixed the failing check test (job 6).

What failed: tests/ui/WorkspaceCompanyCardsPageSelectionModeTest.tsx"keeps the normal company cards header when the layout is not narrow" was asserting the header illustration renders (getByTestId('WorkspaceCompanyCardsPageIcon')). This PR intentionally removes that decorative illustration from WorkspaceCompanyCardsPage, so the icon prop is no longer passed to WorkspacePageWithSections and the icon is never rendered in any layout — the assertion was stale.

Fix: Updated the assertion to expect the icon to be absent, mirroring the sibling narrow-layout test (WorkspaceCompanyCardsPageSelectionModeTest.tsx:208):

-        expect(screen.getByTestId('WorkspaceCompanyCardsPageIcon')).toBeTruthy();
+        expect(screen.queryByTestId('WorkspaceCompanyCardsPageIcon')).toBeNull();

All 4 tests in the suite pass locally now. Pushed as 952c3ac.

The only other failing check, Check independent approval, is unrelated to code (it's about approvals).

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/pages/TeachersUnite/SaveTheWorldPage.tsx 0.00% <ø> (ø)
src/pages/domain/Admins/DomainAdminsPage.tsx 0.00% <ø> (ø)
src/pages/domain/BaseDomainMembersPage.tsx 0.00% <ø> (ø)
src/pages/domain/DomainInitialPage.tsx 0.00% <ø> (ø)
src/pages/domain/DomainSamlPage.tsx 0.00% <ø> (ø)
src/pages/domain/Groups/DomainGroupsPage.tsx 0.00% <ø> (ø)
src/pages/settings/AboutPage/AboutPage.tsx 0.00% <ø> (ø)
src/pages/settings/Agents/AgentsPage.tsx 76.47% <ø> (-0.46%) ⬇️
src/pages/settings/Copilot/CopilotPage.tsx 70.94% <100.00%> (ø)
src/pages/settings/HelpPage/HelpPage.tsx 82.08% <100.00%> (ø)
... and 34 more
... and 168 files with indirect coverage changes

@truph01 truph01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelvinBot Address these comments:

Comment thread src/styles/index.ts Outdated
lineHeight: variables.lineHeightSizeH2,
},

whiteSpaceNoWrap: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whiteSpaceNoWrap duplicates existing noWrap style

styles.noWrap already exists (from the ...whiteSpace spread at line 291) with the same value { whiteSpace: 'nowrap' }. Could we reuse styles.noWrap in WorkspaceInitialPage instead of adding a new style?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — done in fd71e51. Removed the duplicate whiteSpaceNoWrap style and reused the existing styles.noWrap in WorkspaceInitialPage:

Comment thread src/pages/domain/DomainInitialPage.tsx Outdated
>
<HeaderWithBackButton
title={domainName}
titleStyles={styles.textHeadlineH2}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different approach than sibling pages for H2 styling

Other domain/workspace pages use shouldUseHeadlineHeader to get the H2 title style, but this page uses titleStyles={styles.textHeadlineH2} without shouldUseHeadlineHeader. Both achieve the same result since shouldUseHeadlineHeader only controls that same style — would it be cleaner to use shouldUseHeadlineHeader here for consistency, and reserve titleStyles for the extra whiteSpaceNoWrap case in WorkspaceInitialPage?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — switched to shouldUseHeadlineHeader for consistency with the sibling pages (DomainInitialPage.tsx:144) in fd71e51.

Confirmed this renders identically: shouldUseHeadlineHeader applies styles.textHeadlineH2 to the title (HeaderWithBackButton/index.tsx:149), and the extra styles.headerBarHeight it adds (line 232) is a no-op since styles.headerBar already sets the same height: contentHeaderHeight. I also reserved titleStyles for the noWrap extra in WorkspaceInitialPage as you suggested.

…or consistency

Co-authored-by: Shawn Borton <shawnborton@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor

Addressed the review comments in fd71e51:

  • Duplicate whiteSpaceNoWrap style (truph01) — removed it and reused the existing styles.noWrap in WorkspaceInitialPage.tsx:551.
  • H2 styling consistency (truph01) — DomainInitialPage.tsx:144 now uses shouldUseHeadlineHeader like the sibling pages, and WorkspaceInitialPage uses shouldUseHeadlineHeader for the H2 with titleStyles reserved for the noWrap extra. Verified this renders identically (the headerBarHeight that shouldUseHeadlineHeader adds is a no-op since headerBar already sets the same height).
  • Stray node_modules — nothing to remove; node_modules is not committed anywhere in this PR's tree (it only exists locally as installed dependencies), so that earlier thread is already moot.

Ran fmt, lint-changed, typecheck-tsgo, and the affected UI/unit tests — all pass.

@melvin-bot
melvin-bot Bot requested a review from Beamanator August 13, 2026 18:38
@melvin-bot

melvin-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

@Beamanator Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@Beamanator
Beamanator merged commit 1197774 into main Aug 13, 2026
46 of 48 checks passed
@Beamanator
Beamanator deleted the shawn-pageHeaders branch August 13, 2026 19:04
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants